;
(function($) {
	$.extend(true, window, {
		"BaseLookUp" : {
			"init" : init,
			"grantSourceToGoal" : grantSourceToGoal
		}
	});
	
	var op = {
			checkedName : "name",
			url : null,
			navTabId : null,
			checkCallback : function() {
			}
		};
	
	function init(initop) {
		op = $.extend(op, initop);
	}
	
	function grantSourceToGoal (_this) {
		if(_this){
			var $this = $(_this);
			var _args = DWZ.jsonEval($this.val());
			var checked =$this.attr("checked");
			if(checked){
				_args.flag = "add";
			}else{
				_args.flag = "delete";
			}
			$.DWZajax({
				url:hostUrl + op.url,
				data : _args,
				callback : function(json){
					
				}
			});
		}
	}
})(jQuery);